public class Example003 {
    public static void main(String[] args) {
        int sum1 = add (2,4);
        int sum2 = add (2,4);
        System.out.println("三角形的面积为："+sum1);
        System.out.println("三角形的面积为："+sum2);
    }
    public static int add(int x,int y){
        return (x*y)/2;
    }
    public static double add(double x, double y){
        return (x*y)/2;
    }
}
